package com.itheima.commons.model.vo;

import cn.hutool.core.convert.Convert;
import com.itheima.commons.model.domain.UserInfo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserInfoSoulVo implements Serializable {

    private Integer id;
    private String avatar;

    public UserInfoSoulVo(UserInfo userInfo){
        this.id = Convert.toInt(userInfo.getUserId());
        this.avatar = userInfo.getLogo();
    }
}
